// planning.less - 计划分析页面样式
// 使用rem单位，基于80px基准 (80px = 1rem)

// 变量定义 - 与总览页签保持一致
@primary-color: #4fc3f7;
@secondary-color: #81d4fa;
@accent-color: #bbdefb;
@background-dark: #0f1c3c;
@background-light: #1a2d5a;
@card-bg: rgba(22, 40, 75, 0.7);
@border-color: #2a4a7c;
@text-color: #e0e0e0;
@success-color: #4caf50;
@error-color: #f44336;

// 混入(Mixins) - 与总览页签保持一致
.card-shadow() {
  box-shadow: 0 0.1rem 0.3125rem rgba(0, 0, 0, 0.3);
}

.hover-effect() {
  transform: translateY(-0.0625rem);
  box-shadow: 0 0.15rem 0.375rem rgba(0, 0, 0, 0.4);
  border-color: @primary-color;
}

.gradient-border() {
  background: linear-gradient(90deg, @primary-color, #1976d2);
}

.flex-center() {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 计划分析容器 */
.planning-container {
  max-width: 1920px;
  margin: 0 auto;
  background: rgba(22, 40, 75, 0.7);
  border-radius: 0.25rem;
  padding: 0.3125rem;
  box-shadow: 0 0.1rem 0.625rem rgba(0, 0, 0, 0.3);
}

/* 数据展示块样式 - 优化布局 */
.planning-stats-section {
  margin-bottom: 0.5rem;
}

.planning-stats-row {
  display: flex;
  width: 100%;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
}

.planning-stat-group {
  flex: 1;
  display: flex;
  gap: 0.25rem;
  position: relative;
  padding: 0.25rem;
  background: rgba(30, 60, 114, 0.3);
  border-radius: 0.1rem;
  border: 0.0125rem solid rgba(79, 195, 247, 0.3);
}

.planning-stat-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.05rem;
  background: linear-gradient(90deg, @primary-color, #1976d2);
  border-radius: 0.05rem 0.05rem 0 0;
}

.planning-group-title {
  position: absolute;
  top: -0.15rem;
  left: 0.25rem;
  background: rgba(30, 60, 114, 0.9);
  padding: 0.05rem 0.15rem;
  border-radius: 0.05rem;
  color: @secondary-color;
  font-size: 0.2rem;
  font-weight: 600;
  border: 0.0125rem solid rgba(79, 195, 247, 0.5);
}

.planning-stat-card {
  flex: 1;
  background: rgba(30, 60, 114, 0.7);
  border-radius: 0.1rem;
  padding: 0.25rem;
  .card-shadow();
  border: 0.0125rem solid @border-color;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.planning-stat-card:hover {
  .hover-effect();
}

.planning-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.05rem;
  .gradient-border();
}

.planning-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.1875rem;
}

.planning-card-icon {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  .flex-center();
  margin-right: 0.15rem;
  background: rgba(79, 195, 247, 0.1);
  color: @primary-color;
  font-size: 0.25rem;
}

.planning-card-title {
  font-size: 0.225rem;
  color: @secondary-color;
  font-weight: 600;
}

.planning-main-value {
  font-size: 0.4rem;
  font-weight: bold;
  color: @primary-color;
  margin-bottom: 0.125rem;
}

.planning-value-unit {
  font-size: 0.2rem;
  color: @accent-color;
  margin-left: 0.0625rem;
}

.planning-card-description {
  color: @accent-color;
  font-size: 0.175rem;
  margin-bottom: 0.1875rem;
}

.planning-progress-bar {
  height: 0.1rem;
  background: rgba(42, 74, 124, 0.5);
  border-radius: 0.05rem;
  margin-bottom: 0.125rem;
  overflow: hidden;
}

.planning-progress-fill {
  height: 100%;
  .gradient-border();
  border-radius: 0.05rem;
}

.planning-card-footer {
  font-size: 0.175rem;
  color: @secondary-color;
}

/* 图表区域样式 */
.planning-charts-row {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.planning-chart-container {
  flex: 1;
  background: rgba(30, 60, 114, 0.5);
  border-radius: 0.1rem;
  padding: 0.25rem;
  border: 0.0125rem solid @border-color;
  .card-shadow();
  height: 5rem;
}

.planning-chart-title {
  color: @secondary-color;
  font-size: 0.225rem;
  margin-bottom: 0.1875rem;
  text-align: center;
}

.planning-chart-placeholder {
  width: 100%;
  height: 4.25rem;
  background: linear-gradient(45deg, #1a3a6b, #2a4a7c);
  border-radius: 0.075rem;
  .flex-center();
  color: @accent-color;
  font-size: 0.2rem;
}

/* 底部多图表区域 */
.planning-multi-charts-row {
  display: flex;
  gap: 0.375rem;
}

.planning-multi-chart-container {
  flex: 1;
  background: rgba(30, 60, 114, 0.5);
  border-radius: 0.1rem;
  padding: 0.25rem;
  border: 0.0125rem solid @border-color;
  .card-shadow();
  height: 6.25rem;
  display: flex;
  flex-direction: column;
}

.planning-multi-chart-title {
  color: @secondary-color;
  font-size: 0.2rem;
  margin-bottom: 0.1875rem;
  text-align: center;
}

.planning-multi-chart-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.planning-chart-divider {
  height: 0.0125rem;
  background: repeating-linear-gradient(90deg, @border-color, @border-color 0.125rem, transparent 0.125rem, transparent 0.25rem);
  margin: 0.1875rem 0;
}

.planning-chart-half {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.planning-half-chart-title {
  color: @accent-color;
  font-size: 0.175rem;
  text-align: center;
  margin-bottom: 0.125rem;
}

.planning-half-chart-placeholder {
  flex: 1;
  background: linear-gradient(45deg, #1a3a6b, #2a4a7c);
  border-radius: 0.075rem;
  .flex-center();
  color: @accent-color;
  font-size: 0.175rem;
}

/* 响应式设计 */
@media (max-width: 17.5rem) { // 1400px
  .planning-stats-row {
    flex-direction: column;
  }
  
  .planning-charts-row, .planning-multi-charts-row {
    flex-direction: column;
  }
}

@media (max-width: 9.6rem) { // 768px
  .planning-stat-group {
    flex-direction: column;
  }
  
  .planning-stat-card {
    width: 100%;
  }
}